package com.blog.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blog.entity.SysCategory;
import com.blog.mapper.CategoryMapper;
import com.blog.service.CategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author gxcc
 * @create 2021/10/7 20:21
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, SysCategory> implements CategoryService {

    @Resource
    CategoryMapper categoryMapper;

    @Override
    public List<SysCategory> queryAll() {
        return categoryMapper.queryAll();
    }

    @Override
    public void updateActive(Integer enabled,String categoryId) {
        categoryMapper.updateActive(enabled,categoryId);
    }

    @Override
    public List<Map<String, Object>> queryCategoryByCondition(String createBy, String categoryName) {
        return categoryMapper.queryCategoryByCondition(createBy,categoryName);
    }
}
